package Day017_缓冲流_转换流_序列化流_打印流.ZuoYe;

import java.io.PrintStream;
import java.util.Scanner;

/**
 * @author zhangyan
 * @date 2020/5/9 20:55
 */
public class Test10 {
    public static void main(String[] args) throws Exception{

        //创建Scanner对象,接收录入数据
        Scanner sc = new Scanner(System.in);
        System.out.println("输入字符串:");
        String s = sc.nextLine(); //可接收空格

        //创建字节打印流对象
        PrintStream ps = new PrintStream("Demo02\\ccc\\d.txt");

        //调用print方法
        ps.println(s);

        //关流
        ps.close();
    }
}
